// Copyright (C) ZHENG Zhong <heavyzheng nospam-at gmail D0T com>
//
// $Id: io.hpp 225 2008-09-12 17:43:02Z heavyzheng $
//

#ifndef ZZHENG_QUANT_DATES_IO_HPP_20080912__
#define ZZHENG_QUANT_DATES_IO_HPP_20080912__

#include <zzheng/quant/dates/config.hpp>
#include <zzheng/quant/dates/date.hpp>
#include <zzheng/quant/dates/duration.hpp>
#include <zzheng/quant/dates/adjusted_date.hpp>
#include <zzheng/quant/dates/schedule.hpp>

#include <iosfwd>

namespace zzheng {
namespace quant {
namespace dates {

    //! Writes a date to the output stream.
    std::ostream& operator<<(std::ostream& os, const date& d);

    //! Reads a date from the input stream.
    std::istream& operator>>(std::istream& is, date& d);

    //! Writes a duration to the output stream.
    std::ostream& operator<<(std::ostream& os, const duration& d);

    //! Reads a duration from the input stream.
    std::istream& operator>>(std::istream& is, duration& d);

    //! Writes an adjusted date to the output stream.
    std::ostream& operator<<(std::ostream& os, const adjusted_date& ad);

    //! Writes an adjusted date to the output stream.
    std::ostream& operator<<(std::ostream& os, const adjusted_period& ap);

} // namespace zzheng::quant::dates
} // namespace zzheng::quant
} // namespace zzheng

#endif // ZZHENG_QUANT_DATES_IO_HPP_20080912__


